import { seckList } from '../../../request/api'

interface StateSeck {
    secklist: Array<object>
}

const state = {
    secklist: []
}

const getters = {
    getSeckList(state: StateSeck) {
        return state.secklist
    }
}

const mutations = {
    REQ_SECKLIST(state: StateSeck, payload: any) {
        state.secklist = payload
    }
}

const actions = {
    async getSeckListAction(context: any) {
        let res = await seckList()
        console.log(res, '限时活动行动');
        context.commit('REQ_SECKLIST', res.list)
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced: true
}